//
//  YQWalletDetailVC.m
//  NewRetail
//
//  Created by yuqin on 2019/6/25.
//  Copyright © 2019 yuqin. All rights reserved.
//

#import "YQWalletDetailVC.h"
#import "YQWalletDetailCell.h"
#import "YQWalletDetailHeadView.h"

@interface YQWalletDetailVC ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic, strong) NSArray *dataArr;
@property (nonatomic, strong) UITableView *walletDetailTB;
@property (nonatomic, strong) YQWalletDetailHeadView *walletHeadView;

@end

@implementation YQWalletDetailVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.txtTitle.text = @"钱包详情";
    self.view.backgroundColor = UIColorFromRGB(0xeeeeee);
    [self setupWalletDetailView];
    self.dataArr = @[@[@"导出私钥",@"导出Keystore"],@[@"修改密码",@"删除钱包"]];
}

- (void)setupWalletDetailView {
    [self.view addSubview:self.walletHeadView];
    [self.walletHeadView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.top.mas_equalTo(NavigationStatusBarHeight);
        make.size.mas_equalTo(CGSizeMake(ScreenWidth, FIT(160)));
    }];
//    [self.view addSubview:self.walletDetailTB];
//    [self.walletDetailTB mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.left.mas_equalTo(0);
//        make.top.mas_equalTo
//    }];
}

- (UITableView *)walletDetailTB {
    if (!_walletDetailTB) {
        _walletDetailTB = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
        _walletDetailTB.delegate = self;
        _walletDetailTB.dataSource = self;
        [_walletDetailTB registerNib:[UINib nibWithNibName:YQ_WalletDetailCell bundle:nil] forCellReuseIdentifier:YQ_WalletDetailCell];
    }
    return _walletDetailTB;
}

- (YQWalletDetailHeadView *)walletHeadView {
    if (!_walletHeadView) {
        _walletHeadView = [[YQWalletDetailHeadView alloc] init];
    }
    return  _walletHeadView;
}

@end
